package com.lzm.ydpt.mvp.api;

import com.byt.framlib.basemvp.network.HttpUtil;

/**
 * 类描述：   API管理器
 */
public class APIManager extends HttpUtil {

    private APIManager() {

    }

    private static volatile APIManager instance = null;

    public static APIManager getInstance() {
        if (instance == null) {
            synchronized (APIManager.class) {
                if (instance == null) {
                    instance = new APIManager();
                }
            }
        }
        return instance;
    }

    /**
     * @return 返回APIService对象
     */
    public APIService getAPIService() {
        try {
            return getRetrofitInstance().create(APIService.class);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}